package com.gitee.fsmxm.thinking.in.spring.bean.definition;

import com.gitee.fsmxm.thinking.in.spring.ioc.overview.domain.User;
import org.springframework.context.annotation.Bean;

public class Config {
        @Bean // 配置方式
        public User user() {
            User user = new User();
            user.setId(1L);
            user.setName("小马哥");
            return user;
        }
    }